﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Autofac
{
	/// <summary>
	/// Class <see cref="TypeExtensions"/> define extensions to <typeparamref name="System.Type"/>
	/// </summary>
	public static class TypeExtensions
	{
		public static bool IsAssignableTo<T>(this Type that)
		{
			return typeof(T).IsAssignableFrom(that);
		}

		public static bool CanBeInstantiated(this Type that)
		{
			return that.IsClass && !that.IsAbstract;
		}
	}

}